package com.crb.oauth2.api.wechat.cp.controller;

import lombok.AllArgsConstructor;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * OA接口的 controller.
 *
 * @author <a href="https://github.com/binarywang">Binary Wang</a>
 * @date 2020-04-25
 */
@AllArgsConstructor
@Controller
@RequestMapping("/wx/oa")
public class WxOAController {

    @GetMapping("/{agentId}")
    public String share(@PathVariable Integer agentId, ModelMap map) {
        map.put("agentId", agentId);
        map.put("templateId", "ed81360106a0a55c37744dea0571c327_2109529620");
        map.put("thirdNo", String.valueOf(System.currentTimeMillis()));
        return "oa";
    }

}
